def checkID(ID):
    if(len(ID)>=0 and len(ID)<=8):
        for i in ID :
            if(not i.isalnum() and i != '_'):
                     return False
        return True
            
    else :
        return False


def checkEmail(Email):
    if not '@' in Email:
        return False
    elif not (".com" or ".org" or ".edu" or ".gov" or ".net") in Email[-4:]:
        return False
    return True




def checkSFZ(SFZ):
    if(len(SFZ)==18 and SFZ[:16].isdigit()):
        return True
    else:
        return False
       


def checkName( name):
    if(len(name)>=0 and len(name)<=4):
        for i in name.encode('utf-8').decode('utf-8'):
            if ('\u4e00' <= i <= '\u9fa5'):
               continue 
            else: return False
        return True    
    else: return False            


def main():
    ID = input("请输入你的ID")
    Email = input("请输入你的email")
    SFZ = input("请输入你的身份证")
    Name = input("请输入你的名字")
   

    if(not checkID(ID)):
        print("ID错误,ID长度不能超过8位，且只能由数字、字母、下划线组成")
    if(not checkEmail(Email)):
        print("eamil错误,EMAIL地址要求不符合基本电子邮件格式")
    if(not checkSFZ(SFZ)):
        print("身份证不符合格式")
    if(not checkName(Name)):
        print("姓名不符合格式")
    if(SFZ[-1]=='X'):
        sex='男'
    elif(int(SFZ[-1])%2==0):
        sex='女'
    else: sex="男"  
      
    print(ID)
    print(Email)
    print(SFZ)
    print(Name)
    print(checkSFZ(SFZ))
    print(sex)


if __name__ == '__main__':
    main()  
    

